package stephen.teamwork14;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class UserDao {
	BaseDao basedao=new BaseDao(); 
	Connection con=null;
	PreparedStatement ps=null;
	ResultSet rs=null;
   public void closeData() throws SQLException{
	   if (rs!=null){rs.close();}
	   if (ps!=null){ps.close();}
	   if (con!=null){con.close();}
   }
   
   //通过名字从数据库得到一组数据，创建一个用户对象，返回这个用户
   public User getUserByName(String userName){
	User u=new User(userName,id);
	return u;   
   }
   
}
